build(workflows): tolerate GitHub sub-issue cap in create_sub_issue#13376
Draft
Planeshifter wants to merge 1 commit into
Draft
build(workflows): tolerate GitHub sub-issue cap in create_sub_issue#13376Planeshifter wants to merge 1 commit into
create_sub_issue#13376Planeshifter wants to merge 1 commit into
Conversation
The nightly `lint_random_files` workflow's "Create sub-issue for JavaScript lint failures" step failed with exit code 1 on every run in the last several weeks. The GraphQL `addSubIssue` mutation returned a VALIDATION error: "Parent cannot have more than 100 sub-issues", because tracking issue #5377 already has exactly 100 linked sub-issues, GitHub's hard per-parent cap. The child issue itself (containing the lint report) was created successfully each time; only the cosmetic parent-linking step failed, permanently turning the job red with no actionable fix available in-band. This commit detects that specific validation message and treats it as non-fatal: the script now warns and exits 0 instead of exit 1, since the underlying lint report was still filed. Any other error from the mutation (auth, network, unexpected schema) continues to fail loudly as before. Ref: https://github.com/stdlib-js/stdlib/actions/runs/28907996546
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves None.
Description
This pull request:
.github/workflows/scripts/common/create_sub_issue, which unconditionally exited with status 1 whenever theaddSubIssueGraphQL mutation failed for any reason, including GitHub's structural 100-sub-issue-per-parent cap.Related Issues
None.
Questions
No.
Other
Failing run: https://github.com/stdlib-js/stdlib/actions/runs/28907996546 (workflow:
lint_random_files, step: "Create sub-issue for JavaScript lint failures")Symptom: The step has failed on essentially every nightly run for weeks with exit code 1.
Root cause: the
addSubIssueGraphQL mutation returns aVALIDATIONerror —Parent cannot have more than 100 sub-issues— because tracking issue #5377 already has exactly 100 linked sub-issues, GitHub's hard cap. The child issue containing the actual lint report is created successfully every time; only the cosmetic parent-linking call fails, which the script treated as fatal.Fix: the script now detects this specific validation message and, only in that case, prints a warning and exits 0 (the lint report was still filed as a standalone issue). Any other error from the mutation (auth, network, a different validation failure) continues to fail the step as before. This does not require replacing tracking issue #5377 — that is a repository/content decision left to a maintainer — it only stops an unrecoverable GitHub-side limit from permanently reddening unrelated nightly CI.
Validation: confirmed the jq error-detection expression matches the exact error payload from the failing run and correctly falls through to the original failure path for a normal success response, malformed/empty JSON, and unrelated error messages (tested locally with representative payloads). Reviewed by three independent passes (correctness, regression scope — enumerated all four call sites in
lint_random_files.yml, style/conventions); all approved.Reviewer notes: one reviewer suggested emitting a GitHub
::warning::annotation (in addition to the step-log message) so the "sub-issue cap reached" condition is more visible to maintainers going forward; left as a follow-up rather than expanding this fix's scope.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code as part of an automated CI-failure triage and fix routine, based on live GitHub Actions job log analysis and the GraphQL error payload from the failing run. The fix was reviewed by three independent automated review passes (correctness, regression scope, style/conventions) before being proposed here; all approved.
@stdlib-js/reviewers
Generated by Claude Code